package cn.entity;

public class AccessToken {

    private String access_token;
    private Long expiresTime;

    public String getAccess_token() {
        return access_token;
    }

    public void setAccess_token(String access_token) {
        this.access_token = access_token;
    }

    public Long getExpiresTime() {
        return expiresTime;
    }

    public void setExpiresTime(Long expiresIn) {
        this.expiresTime = System.currentTimeMillis() + expiresIn * 1000;
    }

    public boolean isExpired(){
        return System.currentTimeMillis() > this.expiresTime;
    }
}
